import request from '@/utils/request'

export function exportDataToExcelZip(data) {
  return request({
    url: 'api/mysqlData/exportMysqlDataToExcel',
    method: 'get',
    params: data,
    responseType: 'blob'
  })
}

export function exportCreateTableSql() {
  return request({
    url: 'api/mysqlData/exportCreateTableSql',
    method: 'get',
    responseType: 'blob'
  })
}


export function generatorCodeZip(data) {
  return request({
    url: 'api/sys/generator/code',
    method: 'get',
    params: data,
    responseType: 'blob'
  })
}

export function getColumnInfoFromTableName(data) {
  return request({
    url: 'api/sys/generator/getColumnInfoFromTableName',
    method: 'get',
    params: data,
  })
}

export function generatorDataIntoTable(data) {
  return request({
    url: 'api/sys/generator/generatorDataIntoTable',
    method: 'post',
    data: data,
  })
}

export function moduleFileGenerator(data) {
  return request({
    url: 'api/moduleFileGenerator/zip',
    method: 'get',
    params: data,
    responseType: 'blob'
  })
}

export function queryGeneratorCodeConfigByCondition(data) {
  return request({
    url: '/api/efficiencyTools/generatorCodeConfig/queryGeneratorCodeConfigByCondition',
    method: 'get',
    params: data,
  })
}

export function updateGeneratorCodeConfig(data) {
  return request({
    url: '/api/efficiencyTools/generatorCodeConfig/updateGeneratorCodeConfig',
    method: 'post',
    data: data,
  })
}

export function addNewTemplateFileAndConfig(data) {
  return request({
    url: '/api/sys/generator/saveGeneratorCodeFileRuleSingleLineData',
    method: 'post',
    data: data,
  })
}


export function saveColumnMysqlJavaConfigSingleLineData(data) {
  return request({
    url: '/api/efficiencyTools/generatorCodeConfig/saveGeneratorCodeConfigSingleLineData',
    method: 'post',
    data: data,
  })
}


export function jsonCreateJavaEntity(data) {
  return request({
    url: '/api/json/generator/jsonCreateJavaEntity',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}

export function parseMysqlFromExcelZip(data) {
  return request({
    url: '/api/parseMysqlFromExcel/generator/zip',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}

export function createCallSetGetString(data) {
  return request({
    url: '/api/efficiencyTools/createCallSetGetString',
    method: 'post',
    data: data,
  })
}

export function createCallMapString(data) {
  return request({
    url: '/api/efficiencyTools/createCallMapString',
    method: 'post',
    data: data,
  })
}

export function createCallJsonString(data) {
  return request({
    url: '/api/efficiencyTools/createCallJsonString',
    method: 'post',
    data: data,
  })
}

export function createMysqlFromFile(data) {
  return request({
    url: '/api/efficiencyTools/createMysqlFromFile',
    method: 'post',
    data: data,
  })
}

export function createStringFromFile(data) {
  return request({
    url: '/api/efficiencyTools/createStringFromFile',
    method: 'post',
    data: data,
  })
}

export function createJsonFromKey(data) {
  return request({
    url: '/api/jsonHandle/returnJsonFromKey',
    method: 'post',
    data: data,
  })
}


export function transListToExcel(data) {
  return request({
    url: '/api/efficiencyTools/transListToExcel',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}


export function exportDataToExcelFromSql(data) {
  return request({
    url: '/api/efficiencyTools/exportDataToExcelFromSql',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}


export function compareDifferentFromExcel(data) {
  return request({
    url: '/api/efficiencyTools/compareDifferentFromExcel',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}


export function compareDifferentFromSql(data) {
  return request({
    url: '/api/efficiencyTools/compareDifferentFromSql',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}

export function compareDifferentFromList(data) {
  return request({
    url: '/api/efficiencyTools/compareDifferentFromList',
    method: 'post',
    data: data
  })
}

export function multiMediaHandleModifyMusicFile(data) {
  return request({
    url: '/api/efficiencyTools/modifyMusicFile',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}


export function multiMediaHandleMultiModifyMusicFile(data) {
  return request({
    url: '/api/efficiencyTools/multiModifyMusicFile',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}


export function getDataFromExcel(data) {
  return request({
    url: '/api/efficiencyTools/getDataFromExcel',
    method: 'post',
    data: data,
  })
}


export function generateExcelFromPageConfig(data) {
  return request({
    url: '/api/efficiencyTools/generateExcelFromPageConfig',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}


export function queryColumnInfo(data) {
  return request({
    url: 'api/sys/generator/queryColumnInfo',
    method: 'get',
    params: data,
  })
}


export function handleMultiTableModelGenerator(data) {
  return request({
    url: 'api/sys/generator/handleMultiTableModelGenerator',
    method: 'post',
    data: data,
  })
}


